package com.beifu.manager.model;

import java.util.Date;

import org.springframework.util.StringUtils;

import com.utils.Constants.ASSET_INFO_STATUS;

public class AssetInTruth {
    private Long id;

    private String assetInfoRfidCode;

    private String inPotion;

    private Integer operatingUserId;

    private String operatingDeviceId;

    private Long assetInId;

    private Date inputTime;

    //界面展示
    private AssetInfo assetInfo;
    private String assetTypeName;
    private String assetInfoStatusName;



    public String getAssetInfoStatusName() {
        if(null != assetInfo && null != assetInfo.getStatus() && !StringUtils.isEmpty(assetInfo.getStatus().toString())){
            if(ASSET_INFO_STATUS.Scrap.getStatus().equals(assetInfo.getStatus().toString())){
                this.assetInfoStatusName = ASSET_INFO_STATUS.Scrap.getName();
            }else if(ASSET_INFO_STATUS.Inlibrary.getStatus().equals(assetInfo.getStatus().toString())){
                this.assetInfoStatusName = ASSET_INFO_STATUS.Inlibrary.getName();
            }else if(ASSET_INFO_STATUS.InCar.getStatus().equals(assetInfo.getStatus().toString())){
                this.assetInfoStatusName = ASSET_INFO_STATUS.InCar.getName();
            }else if(ASSET_INFO_STATUS.InWash.getStatus().equals(assetInfo.getStatus().toString())){
                this.assetInfoStatusName = ASSET_INFO_STATUS.InWash.getName();
            }
        }
        return assetInfoStatusName;
    }

    public void setAssetInfoStatusName(String assetInfoStatusName) {
        this.assetInfoStatusName = assetInfoStatusName;
    }

    public String getAssetTypeName() {
        if(null != assetInfo && null != assetInfo.getAssetBase()
                && null != assetInfo.getAssetBase().getAssetType()){
            this.assetTypeName = assetInfo.getAssetBase().getAssetType().getName();
        }
        return assetTypeName;
    }

    public void setAssetTypeName(String assetTypeName) {
        this.assetTypeName = assetTypeName;
    }

    public AssetInfo getAssetInfo() {
        return assetInfo;
    }

    public void setAssetInfo(AssetInfo assetInfo) {
        this.assetInfo = assetInfo;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAssetInfoRfidCode() {
        return assetInfoRfidCode;
    }

    public void setAssetInfoRfidCode(String assetInfoRfidCode) {
        this.assetInfoRfidCode = assetInfoRfidCode;
    }

    public String getInPotion() {
        return inPotion;
    }

    public void setInPotion(String inPotion) {
        this.inPotion = inPotion;
    }

    public Integer getOperatingUserId() {
        return operatingUserId;
    }

    public void setOperatingUserId(Integer operatingUserId) {
        this.operatingUserId = operatingUserId;
    }

    public String getOperatingDeviceId() {
        return operatingDeviceId;
    }

    public void setOperatingDeviceId(String operatingDeviceId) {
        this.operatingDeviceId = operatingDeviceId;
    }

    public Long getAssetInId() {
        return assetInId;
    }

    public void setAssetInId(Long assetInId) {
        this.assetInId = assetInId;
    }

    public Date getInputTime() {
        return inputTime;
    }

    public void setInputTime(Date inputTime) {
        this.inputTime = inputTime;
    }
}